package cn.wolfcode.util;

import lombok.Getter;

@Getter
public enum CustomerStatusEnum {

    STATUS_COMMON("潜在客户",0),
    STATUS_NORMAL("正式客户",1),
    STATUS_FAIL("开发失败",2);

    private String name;
    private Integer value;

    CustomerStatusEnum(String name,Integer value){
        this.name = name;
        this.value = value;
    }

    public static String getNameByValue(Integer value){
        CustomerStatusEnum[] enums = values();
        for (CustomerStatusEnum anEnum : enums) {
            if (anEnum.getValue().equals(value)) {
                return anEnum.getName();
            }
        }
        return null;
    }


/*    public static final int STATUS_COMMON = 0 ;//潜在客户
    public static final int STATUS_NORMAL = 1 ;//正式客户
    public static final int STATUS_FAIL = 2 ;//开发失败
    public static final int STATUS_LOST = 3 ;//流失客户
    public static final int STATUS_POOL = 4 ;//客户池*/

}
